package com.zgjkhis.modules.system.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @Author yzq
 * @Description 渠道
 * @Date 2021/6/23 9:38
 * @Param
 * @return
 **/
@Data
@TableName("his_api_channel")
public class ApiChannel implements Serializable {

    @TableId
    private Long id;
    @ApiModelProperty(value = "私钥")
    private String privateKey;
    @ApiModelProperty(value = "公钥")
    private String publicKey;
    @ApiModelProperty(value = "渠道id")
    private String appId;
    @ApiModelProperty(value = "描述")
    private String description;
    @ApiModelProperty(value = "状态")
    private Integer status;
    @ApiModelProperty(value = "创建者id")
    private String createUser;
    @ApiModelProperty(value = "渠道名称")
    private String appName;
    @ApiModelProperty(value = "回调appId")
    private String callBackAppId;
    @ApiModelProperty(value = "回调私钥")
    private String callBackPrivateKey;
    @ApiModelProperty(value = "回调公钥")
    private String callBackPublicKey;
    @ApiModelProperty(value = "回调地址")
    private String callBackUrl;


    public void copy(ApiChannel source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
